<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('修改【请填写功能名称】')" />
</head>
<style>
    .coursenum{
        border: none;
        background: none;
        width:30px;
    }
</style>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="formId" name="formId" action="" method="post" th:object="${training}">
                <div class="select-list">
                    <ul>
                        <li>
                            <p>计划名称：</p>
                            <input type="text" name="planName" id="planName" th:value="${training.planName}" disabled/>
                        </li>
                        <li>
                            <p>专业：</p>
<!--                            <select name="majorId" id="majorId" th:with="type=${@dict.getType('sys_profession')}" onchange="$.table.search()">-->
<!--                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictCode}"></option>-->
<!--                            </select>-->
                            <input type="text" name="planName" id="majorName" th:value="${training.majorName}"disabled/>
                        </li>

                        <li>
                            <p>版本：</p>
                            <input type="text" name="version" id="version" th:value="${training.version}"disabled/>
                        </li>
                        <li class="select-time">
                            <p>生效时间：</p>
                            <input type="text" style="width:58%"  th:value="${training.effectiveTime}"  data-format="yyyy-MM-dd" disabled/>
                        </li>
<!--                        <li>-->
<!--                            <a class="btn btn-primary btn-rounded btn-sm" onclick="submitHandler()"><i class="fa fa-search"></i>&nbsp;保存</a>-->
<!--                            <a class="btn btn-warning btn-rounded btn-sm" onclick="$.modal.reload()"><i class="fa fa-refresh"></i>&nbsp;取消</a>-->
<!--                        </li>-->
                    </ul>
                </div>
            </form>
        </div>
        <div class="col-sm-12 select-table table-striped">
            <form id="commitForm">
                <table id="bootstrap-table">

                </table>
            </form>
        </div>
    </div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
    var editFlag = [[${@permission.hasPermi('system:train:edit')}]];
    var removeFlag = [[${@permission.hasPermi('system:train:remove')}]];
    var prefix = ctx + "website/train";

    $(function() {
        var options = {
            // url: prefix + "/arrList/"+$("#planName").val(),
            url: prefix + "/edit",
            modalName: "培养计划",
            columns: [{
                filed:'id',
                title:'序号',
                formatter: function (value, row, index) {
                    console.log(row);
                    return $.table.serialNumber(index);
                }
            },
                {
                    field : 'courseName',
                    title : '课程名称',
                },
                {
                    field : 'studyTime',
                    title : '学时',
                },
                {
                    field : 'studyScore',
                    title : '学分'
                },
                {
                    field : 'teacherName',
                    title : '教师姓名',
                },
                {
                    field : 'tbClass',
                    title : '班级',
                },
                {
                    field : 'chooseCourseType',
                    title : '选课类型',
                    formatter: function (value, row, index) {
                        if(value==0){
                            return "必修课"
                        }else{
                            return "选修课"
                        }
                    }
                },
                {
                    field : 'courseType',
                    title : '课程类型',
                    formatter: function (value, row, index) {
                        if(value==0){
                            return "公共课程"
                        }else{
                            return "专业课程"
                        }
                    }
                },
                {
                    field : 'assessWay',
                    title : '考核方式',
                    formatter: function (value, row, index) {
                        if(value==0){
                            return "考试"
                        }else{
                            return "考察"
                        }
                    }
                }]
        };
        $.table.init(options);
    });

</script>
</body>
</html>